from app.db.models.charges import Charges


class ChargesHelper(object):
    def __init__(self, query=None, is_delete=False):
        if not query:
            query = {}
        self.query = {'isDelete': False}
        if is_delete:
            self.query['isDelete'] = True

        self.query.update(query)

    def get(self):
        return Charges.objects.find(self.query)
